<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<h:head />


<h:body>
	<h:form id="dialog">
		<p:dialog header="File Menu" widgetVar="fileDialog" showEffect="clip"
			hideEffect="drop" modal="true" dynamic="true"
			style="margin: auto; width: 1000px; height: 600px" id="cont_dialog"
			position="center" onShow="load()">

			<p:remoteCommand name="load"
				actionListener="#{fileContentBean.loadContent()}"
				update="cont,selectMenu" />

			

			<f:facet name="header">

				<p:panelGrid columns="2">

					<h:outputText value="File: " styleClass="textBig" />
					<h:outputText id="fileName" value="#{fileContentBean.fileName}"
						styleClass="textBig" />

					<h:outputText value="Revision: " styleClass="textBig" />
					<p:selectOneMenu id="selectMenu"
						value="#{fileContentBean.selectedRev}" effect="fade"
						styleClass="text" style="text-align:left!important">
						<f:selectItem itemLabel="last revision" itemValue="" />
						<f:selectItems value="#{fileContentBean.revisions}" />
						<p:ajax event="change"
							listener="#{fileContentBean.clearContent()}"
							update="cont,selectMenu" oncomplete="load()" />

					</p:selectOneMenu>

				</p:panelGrid>
			</f:facet>

	

		
			<p:inputTextarea id="cont" value="#{fileContentBean.content}"
					autoResize="false" readonly="true" scrollHeight="350"
					style="height: 100%; width:100%; font-size:12px  ">

</p:inputTextarea>





		</p:dialog>

	</h:form>

</h:body>
</html>